{messages}
{if $iRepair}
<div class="border13" style="padding:5px;">
	<b>{language text="admin_tables_fixed"}: {$iRepair}</b>
</div>
<br />
{/if}
{if $iOptimized}
<div class="border13" style="padding:5px;">
	<b>{language text="total_tables_optimized"} {$iOptimized}</b>
</div>
<br />
{/if}
<form method="post" name="myform" action="{if !get('backup')}{url link='admin.extra.mysql'}{else}{url link='admin.extra.mysql' backup='true'}{/if}">
<table cellspacing="0" cellpadding="0" width="100%" class="forumline">
<tr>
	<td class="row-header" colspan="5"><span>{language text="mysql"}</span></td>
</tr>
<tr>
    <td class="catBottom" colspan="5">
        <b> {language text="total_mysql_db_size"} </b> {$iSize|filesize} -
        {if !get('backup')}<b> {language text="overhead"} </b> {$iOverhead|filesize} -{/if}
        <b> {language text="total_tables"} </b> {$iCnt}
    </td>
</tr>
{if get('backup')}
<tr>
	<td class="row1" colspan="5">
	{language text='Mod_Admin.large_backup_notice'}
	</td>
</tr>
{/if}
        <tr>
        <th style="width:4%; font-size:9pt; text-align:center;">
			<input type="checkbox" value="" onclick="sel('ta');return false;" />
        </th>
            <th style="width:36%;font-size:9pt;">
                <b>{language text="table"}</b>
            </th>
        {* if !get('backup') *}
        <th style="width:20%;font-size:9pt;">
             <b>{language text="records"}</b>
        </th>
        {* /if *}
		<th style="width:20%;font-size:9pt;">
            <b>{language text="size"}</b>
        </th>
        {* if !get('backup') *}
        <th style="width:20%;font-size:9pt;">
                <b>{language text="overhead_235"}</b>
        </th>
        {* /if *}
		{foreach from=$aItems item=aItem name=aitems key=iKey}
        <tr>
            <td style="width:4%; text-align:center;" class="row1{if $iKey is odd}b{/if}"> <input type="checkbox" name="tables[]" style="border:0px;" value="{$aItem.Name}" />  </td>
            <td style="width:36%;" class="row1{if $iKey is odd}b{/if}"> {$aItem.Name}   </td>
             {* if !get('backup') *}
            <td style="width:20%;" class="row1{if $iKey is odd}b{/if}"> {$aItem.Rows}   </td>
             {* /if *}
            <td style="width:20%;" class="row1{if $iKey is odd}b{/if}"> {$aItem.Data_length|filesize} </td>
             {* if !get('backup') *}
            <td style="width:20%;" class="row1{if $iKey is odd}b{/if}"> {$aItem.Data_free|filesize} </td>
             {* /if *}
        </tr>
		{/foreach}
        <tr>
            <td class="catBottom" colspan="5" style="text-align:center;">
                {if get('backup')}
				<input type="submit" name="download" value="{language text='Mod_Admin.download_backup'}" />
                {else}
                <input type="submit" name="act[optimize]" value="{language text='optimize_table_s'}" />
                <input type="submit" name="act[repair]" value="{language text='admin_repair_tables'}" />
                {/if}
            </td>
        </tr>
</table>
</form>
<br />

{if get('backup')}
<form method="post" action="{url link='admin.extra.mysql' backup='true'}">
<div><input type="hidden" name="file" value="{$sSavedFile}" size="40" /></div>
<table cellspacing="0" cellpadding="0" width="100%" class="forumline">
<tr>
	<td class="row-header"><span>{language text='Mod_Admin.save_backup'}</span></td>
</tr>
<tr>
	<td class="row1">
		{language text='Mod_Admin.backup_file_location'}: {$sSavedFile}
	</td>
</tr>
<tr>
	<td class="catBottom" style="text-align:center;">
		<input type="submit" name="save" value="{language text='Mod_Admin.save_backup_button'}" />
	</td>
</tr>
</table>
</form>
{/if}

<br />